<div class="app-content-body ">   
    <div class="bg-light lter b-b wrapper-md hidden-print">
      <h1 class="m-n font-thin h3">平台分红记录</h1>
    </div>
    <div class="crud-container crud-reset">
		<div class="row">
			<div class="col-sm-12">
				<div class="data-grid"></div>
			</div>
		</div>
	</div>
</div>
<script>
$(function(){
    $(".data-grid").dxDataGrid({
    	dataSource: $.crudStore(API('dividend')),
    	selection: {
			mode: "single",
			showCheckBoxesMode: 'always'
		},
        remoteOperations: true,
        paging: {
            pageSize: 10,
            pageIndex: 0
        },
        onSelectionChanged: function(e) {
        	if (e.selectedRowsData.length > 0) {
        		updateSpiderWeb(e.selectedRowsData[0]);
        	}
        },
		columns: [{
			dataField: 'dividend_date',
			caption: '分红日期',
            sortOrder: 'desc'
		}, {
			dataField: 'user_count',
			caption: '分红用户数'
		}, {
			dataField: 'partake_total',
			caption: '参与分红总金额（万元）',
			format: function(v) {
	      		return parseFloat(v).toFixed(2);
	      	}
		},{
			dataField: 'plan_price',
			caption: '分红金额/万元',
			format: function(v) {
      			return parseFloat(v).toFixed(2);
      	  }
		}, {
			dataField: 'dividend_total',
			caption: '分红总金额',
			format: function(v) {
	      		return parseFloat(v).toFixed(2);
	      	}
		}]
   });
})
</script>